package com.laterem.rtc.service;

import com.alibaba.fastjson.JSONArray;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.laterem.rtc.domain.ActivityDO;
import com.laterem.rtc.domain.ActivityItemDO;
import com.laterem.rtc.domain.UserDO;

import java.util.Map;

/**
 * @creator: alan wu
 * @dateTime: 2023/5/20 01:32
 * @desc:
 */
public interface UserService {

    /**
     * 获取用户token
     * @param username
     * @param password
     * @return
     */
    String login(String username, String password, Integer type);
    /**
     * 分页查询用户数据
     * @param page
     * @return
     */
    IPage<UserDO> userList(Page page);

    JSONArray location(String cellphone);

    void save(UserDO userDO);

    void update(UserDO userDO);

    void delete(Integer id);

    String wechatLogin(UserDO userDO);

    String adminLogin(String username, String password);

    void saveActivity(ActivityDO activityDO);

    void updateActivity(ActivityDO activityDO);

    IPage<ActivityDO> activityList(Page page);

    void deleteActivity(Integer id);

    void saveActivityItem(ActivityItemDO activityItemDO);

    void updateActivityItem(ActivityItemDO activityItemDO);

    void deleteActivityItem(Integer id);

    void bet(Integer activityItemId, Integer guessResult, String openId);

    ActivityDO activity(String openId);

    void updateJackpot(Integer number);

    String selectJackpot();

    String getOpenId(String code);

    void updateUser(UserDO userDO);

    UserDO getUserInfo(String openId);

    ActivityItemDO newActivityItem(String openIdStr);

}
